/* 
 * processFunctions.h
 *
 *  Created on: 10/04/2014
 *      Author: Emiliano R. Gudino
 */

#ifndef PROCESSFUNCTIONS_H_
#define PROCESSFUNCTIONS_H_

#include "Socket_Conn.h"
#include "scpi/commands.h"

typedef char (*ptr_functions_type) (command_request_str *, command_response_str *);	// Define as a type a function pointer that return void
																						// and has two arguments: command_request_str * and command_response_str *

// Functions used to process some general commands
char Process_Default(command_request_str *, command_response_str *);
char Process_Error(command_request_str *, command_response_str *);
char Process_Volt(command_request_str *, command_response_str *);
char Process_IdnQM(command_request_str *, command_response_str *);
char Process_Meas_Volt(command_request_str *, command_response_str *);

// Prototype of the function that sets up the function pointers array
char Init_Functions_Ptr_Array(ptr_functions_type ptr_functions[]);

#define SUCCESS 1
#define ERROR 0

#endif /* PROCESSFUNCTIONS_H_ */
